<template>
    <div>
      <div v-if="hasPermission('view_publicizeManagementView')">
        <div>你好管理员，本功能正在施工中</div>
      </div>
    </div>
  </template>
  
  <script>
  import { mapGetters } from "vuex";
  
  export default {
    name: "CardManegementView",
    computed: {
      ...mapGetters("user", ["permissions"]), // 从 user 模块中获取 permissions
      hasPermission() {
        return (permission) => this.permissions.includes(permission);
      },
    },
    mounted() {
      // 在组件加载时检查权限
      if (!this.hasPermission("view_publicizeManagementView")) {
        // 如果没有权限，跳转到 403 页面
        this.$router.push("/Permissions403View");
      }
    },
  };
  </script>
  